/*
 * This file is generated by jOOQ.
 */

package ru.tinkoff.edu.java.scrapper.domain.jooq.tables.pojos;

import java.beans.ConstructorProperties;
import java.io.Serializable;
import java.time.OffsetDateTime;
import javax.annotation.processing.Generated;
import org.jetbrains.annotations.NotNull;

/**
 * This class is generated by jOOQ.
 */
@Generated(
    value = {
        "https://www.jooq.org",
        "jOOQ version:3.18.9"
    },
    comments = "This class is generated by jOOQ"
)
@SuppressWarnings({"all", "unchecked", "rawtypes", "this-escape"})
public class TelegramChat implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;
    private OffsetDateTime registeredAt;

    public TelegramChat() {
    }

    public TelegramChat(TelegramChat value) {
        this.id = value.id;
        this.registeredAt = value.registeredAt;
    }

    @ConstructorProperties({"id", "registeredAt"})
    public TelegramChat(
        @NotNull Long id,
        @NotNull OffsetDateTime registeredAt
    ) {
        this.id = id;
        this.registeredAt = registeredAt;
    }

    /**
     * Getter for <code>TELEGRAM_CHAT.ID</code>.
     */
    @jakarta.validation.constraints.NotNull
    @NotNull
    public Long getId() {
        return this.id;
    }

    /**
     * Setter for <code>TELEGRAM_CHAT.ID</code>.
     */
    public void setId(@NotNull Long id) {
        this.id = id;
    }

    /**
     * Getter for <code>TELEGRAM_CHAT.REGISTERED_AT</code>.
     */
    @jakarta.validation.constraints.NotNull
    @NotNull
    public OffsetDateTime getRegisteredAt() {
        return this.registeredAt;
    }

    /**
     * Setter for <code>TELEGRAM_CHAT.REGISTERED_AT</code>.
     */
    public void setRegisteredAt(@NotNull OffsetDateTime registeredAt) {
        this.registeredAt = registeredAt;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final TelegramChat other = (TelegramChat) obj;
        if (this.id == null) {
            if (other.id != null) {
                return false;
            }
        } else if (!this.id.equals(other.id)) {
            return false;
        }
        if (this.registeredAt == null) {
            if (other.registeredAt != null) {
                return false;
            }
        } else if (!this.registeredAt.equals(other.registeredAt)) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((this.id == null) ? 0 : this.id.hashCode());
        result = prime * result + ((this.registeredAt == null) ? 0 : this.registeredAt.hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder("TelegramChat (");

        sb.append(id);
        sb.append(", ").append(registeredAt);

        sb.append(")");
        return sb.toString();
    }
}
